<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<c:import url="/jsp/pager/pagerForm.jsp"></c:import>

<form method="post" rel="pagerForm" action="<c:url value='/repair/showList'/>" onsubmit="return navTabSearch(this)">
	<div class="pageHeader">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><label>关键词：</label> <input type="text" name="keywords" value="${param.keywords}" /></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">搜索</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
</form>

<div class="pageContent">

	<div class="panelBar">
		<ul class="toolBar">
			<c:if test="${sessionInfo.role == '管理员' || sessionInfo.role == '财务' || sessionInfo.role == '技术员'}">
				<li><a class="add" target="dialog" width="530" height="650" rel="repairAdd" mask="true"
					href="<c:url value='/repair/showAdd'/>" title="添加维修"><span>添加</span></a></li>
				<li><a class="edit" target="dialog" width="530" height="650" rel="repairEdit" mask="true"
					href="<c:url value='/repair/showEdit/{slt_objId}'/>" title="编辑维修"><span>编辑</span></a></li>
			</c:if>
			<c:if test="${sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
				<li><a class="delete" target="ajaxTodo" href="<c:url value='/repair/delete/{slt_objId}'/>" title="你确定要删除吗?"><span>删除</span></a></li>
			</c:if>
			<li><a class="edit" target="dialog" width="530" height="650" rel="repairEdit" mask="true"
				href="<c:url value='/repair/showRepair/{slt_objId}'/>" title="查看维修"><span>查看</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="javascript:$.printBox('repair_list_print')"><span>打印</span></a></li>
		</ul>
	</div>

	<div id="repair_list_print">
		<table class="list" width="1920" asc="asc" desc="desc" layoutH="116">
			<thead>
				<tr>
					<th width="3%">序号</th>
					<th width="8.5%" orderField="customer" class="${pageHelper.orderField eq 'customer' ? param.orderDirection : ''}">客户</th>
					<th width="4%" orderField="salesman" class="${pageHelper.orderField eq 'salesman' ? param.orderDirection : ''}">所属业务员</th>
					<th width="7%" orderField="product" class="${pageHelper.orderField eq 'product' ? param.orderDirection : ''}">产品及型号</th>
					<th width="6.25%" orderField="imei" class="${pageHelper.orderField eq 'imei' ? param.orderDirection : ''}">机身号</th>
					<th width="7.5%" orderField="fault" class="${pageHelper.orderField eq 'fault' ? param.orderDirection : ''}">故障及特点</th>
					<th width="6.25%" orderField="takeFromCustomer"
						class="${pageHelper.orderField eq 'takeFromCustomer' ? param.orderDirection : ''}">从客户取回日期</th>
					<th width="4%" orderField="takeFromCustomerHandling"
						class="${pageHelper.orderField eq 'takeFromCustomerHandling' ? param.orderDirection : ''}">经手人</th>
					<th width="6.25%" orderField="repairDatetime"
						class="${pageHelper.orderField eq 'repairDatetime' ? param.orderDirection : ''}">送修日期</th>
					<th width="4%" orderField="repairHandling"
						class="${pageHelper.orderField eq 'repairHandling' ? param.orderDirection : ''}">经手人</th>
					<th width="6.25%" orderField="repairRemarks"
						class="${pageHelper.orderField eq 'repairRemarks' ? param.orderDirection : ''}">送修备注</th>
					<th width="6.25%" orderField="takeBackDatetime"
						class="${pageHelper.orderField eq 'takeBackDatetime' ? param.orderDirection : ''}">取回日期</th>
					<th width="4%" orderField="takeBackHandling"
						class="${pageHelper.orderField eq 'takeBackHandling' ? param.orderDirection : ''}">经手人</th>
					<th width="6.25%" orderField="returnCustomerDatetime"
						class="${pageHelper.orderField eq 'takeBackDatetime' ? param.orderDirection : ''}">送还客户日期</th>
					<th width="4%" orderField="returnCustomerHandling"
						class="${pageHelper.orderField eq 'takeBackHandling' ? param.orderDirection : ''}">经手人</th>
					<th width="6.25%" orderField="deliveryNo"
						class="${pageHelper.orderField eq 'deliveryNo' ? param.orderDirection : ''}">送货单号</th>
					<th width="10.25%" orderField="remarks" class="${pageHelper.orderField eq 'remarks' ? param.orderDirection : ''}">备注</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="item" items="${repairList}" varStatus="s">
					<tr target="slt_objId" rel="${item.id }">
						<td>${s.index + 1}</td>
						<td>${item.customer}</td>
						<td>${item.salesman}</td>
						<td>${item.product}</td>
						<td>${item.imei}</td>
						<td>${item.fault}</td>
						<td>${item.takeFromCustomer}</td>
						<td>${item.takeFromCustomerHandling}</td>
						<td>${item.repairDatetime}</td>
						<td>${item.repairHandling}</td>
						<td>${item.repairRemarks}</td>
						<td>${item.takeBackDatetime}</td>
						<td>${item.takeBackHandling}</td>
						<td>${item.returnCustomerDatetime}</td>
						<td>${item.returnCustomerHandling}</td>
						<td>${item.deliveryNo}</td>
						<td>${item.remarks}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>

	<c:import url="/jsp/pager/panelBar.jsp"></c:import>

</div>
